var i;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var UI_GetItems_UIBindings = require("AA_UI_GetItems_UIBindings");
var UIView = require("AA_UIView");
var Item_Icon = require("AA_Item_Icon");
var AudioManager = require("AA_AudioManager");
var _decorator = cc._decorator;
var _ccclass = _decorator.ccclass;
var _property = _decorator.property;

var _def_UI_GetItems = function (e) {
  function _creator() {
    var t = null !== e && e.apply(this, arguments) || this;
    t.auto_ui = null;
    t.delayTime = .1;
    return t;
  }
  __extends(_creator, e);
  _creator.prototype._show = function (e) {
    this.delayTime = .1;
    this.m_Data = e;
    if (e.ids.length <= 5) {
      this.auto_ui.list_min.numItems = e.ids.length;
    } else {
      this.auto_ui.list_max.numItems = e.ids.length;
    }
    AudioManager.AudioMgr.playEffect("audio/effect/getReward");
  };
  _creator.prototype.getItemRender = function (e, t) {
    e.getComponent(Item_Icon.default).init(this.m_Data.ids[t], this.m_Data.counts[t]);
    e.stopAllActions();
    e.scale = 0;
    e.runAction(cc.sequence(cc.delayTime(this.delayTime), cc.scaleTo(.1, 1, 1)));
    this.delayTime += .05;
  };
  _creator.prototype._clickListener = function () {
    this.m_Data && this.m_Data.clickCallBack && this.m_Data.clickCallBack();
    this.m_Data = null;
    this._close();
  };
  __decorate([_property(UI_GetItems_UIBindings.default)], _creator.prototype, "auto_ui", undefined);
  return __decorate([_ccclass], _creator);
}(UIView.default);
exports.default = _def_UI_GetItems;